<include file="public@header" />
<style>
	table{ border:1px solid #000; width:80%; font-size:1rem; margin-bottom:20px}
	td{border:1px solid #000; padding:0 5px; height:2rem; text-align:center}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('visual/register')}">{:lang('可视化墓区')}</a></li>
            <li><a href="{:url('visual/sale')}">墓位信息</a></li>
			<!--<li><a href="{:url('orders/buyer')}">申请人信息</a></li>-->
            <li><a href="{:url('visual/applyer')}">购墓人信息</a></li>
			<li><a href="{:url('visual/user')}">使用人信息</a></li>
            <li><a href="{:url('visual/chooseGoods')}">商品选购</a></li>
			<li class="active"><a href="{:url('visual/signContract')}">合同签订</a></li>
			<li><a href="{:url('visual/orderPay')}">订单支付</a></li>
		</ul>
        <form class="form-horizontal js-ajax-form" action="{:url('store/add_post')}" method="post" enctype="multipart/form-data" style="width:25%; float:left;">
            <fieldset>
            	<h4>基本信息</h4>
                <div class="control-group">
                    <label class="control-label">合同备案号</label>
                    <div class="controls">
                        <input type="text" class="form-control" name="user_login" value="读取" disabled>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">合同备案日期</label>
                    <div class="controls">
                        <input type="text" class="form-control" name="user_login" value="读取" disabled>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">合同附件</label>
                    <div class="controls">
                        <input type="text" class="form-control" name="slide_pic" id="site_logo_name" value="" readonly/>
                        <input type="hidden" name="slide_pic" id="site_logo" value="" readonly/>
                         <a class="btn btn-primary upload" href="javascript:upload_one('合同上传','#site_logo','file');">{:lang("UPLOAD")}</a>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">合同补充附件</label>
                    <div class="controls">
                        <input type="text" class="form-control" name="slide_pic" id="site_logo1_name" value="" readonly/>
                        <input type="hidden" name="slide_pic" id="site_logo1" value="" readonly/>
                         <a class="btn btn-primary upload" href="javascript:upload_one('合同上传','#site_logo1','file');">{:lang("UPLOAD")}</a>
                    </div>
                </div>
			</fieldset>
			<div class="form-actions">
            	<div class="btn btn-primary" id="check-btn">保存</div>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
		</form>
        <div style="width:68%; float:left; margin-left:3%;">
        	<iframe id="contract" src='https://view.officeapps.live.com/op/view.aspx?src=http://jiance.zkjysw.com/data/upload/user/20200218/5e4b92cb8bfbf.docx' width='100%' height='100%' frameborder='1' style="width:100%; min-height:500px; max-height:800px;">
        </div>
</iframe>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
    
	<script type="text/javascript">
	 // 提交订单
	$("#check-btn").click(function(){
		$.post($("form").attr('action'), $("form").serialize(), function(result){
			if(result.state == 'success'){
				alert("保存成功！");
				$('#js-dialog-close').click();
			} else {
				alert(result.info);
			}
		}, 'json');
	});
	function upload_one(dialog_title,input_selector,extra_params,app){
				open_upload_dialog(dialog_title,function(dialog,files){
					$(input_selector).val("data/upload/" + files[0].filepath);
					$(input_selector+'_preview').attr('src', "data/upload/" + files[0].filepath).show();
					$(input_selector+'_name').val(files[0].name);
					$("#contract").attr('src','https://view.officeapps.live.com/op/view.aspx?src=http://cemetery.com'+files[0].filepath);
				},'slide',0,'file',app);
			}
    </script>

</body>
</html>